package com.fxkj.cloud.drms.infra.feignApi;

import com.fxkj.cloud.dbs.common.model.DeviceAttributeKey;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;
import java.util.UUID;

/**
 * <p>description: </p>
 * @author ww
 * @date 2025/3/20 16:52
 */
@FeignClient(contextId = "deviceFeignApi", name = "fx-cloud-dbs", path = "/dbs/api/feign/v1/device")
public interface DeviceFeignApi {
    @GetMapping("deviceAttributeKeys")
    List<DeviceAttributeKey> deviceAttributeKeys(@RequestParam UUID deviceId, @RequestParam Set<String> attributeKeys);

    @PostMapping("deviceControlPlanCallback")
    void deviceControlPlanCallback(@RequestParam UUID requestId, @RequestParam String deviceSerialNo);

    @GetMapping("deviceAttributeKeysByIds")
    List<DeviceAttributeKey> deviceAttributeKeysByIds(@RequestParam UUID deviceId, @RequestParam Integer sn, @RequestParam Set<UUID> attributeIds);
}
